﻿using System;
using System.Windows;
using System.Windows.Threading;

namespace KinectCurve.ViewModel
{
    public partial class MainViewModel
    {
        private DispatcherTimer _gameTimer = null;
        private DateTime _gameStartTime;        

        private readonly string TimeToPlayPropertyName = "TimeToPlay";
        private string _timeToPlay = "00:00";
        public string TimeToPlay
        {
            get { return string.Format("  {0}", _timeToPlay); }
            set
            {
                if (_timeToPlay != value)
                {
                    _timeToPlay = value;
                    RaisePropertyChanged(TimeToPlayPropertyName);
                }
            }
        }
        
        public const string GameTitlePropertyName = "GameTitle";
        private string _gameTitle = "Kinect Curve";
        public string GameTitle
        {
            get
            {
                return _gameTitle;
            }
            set
            {
                if (_gameTitle != value)
                {
                    _gameTitle = value;
                    RaisePropertyChanged(GameTitlePropertyName);
                }
            }
        }
        
        public const string FooterTextPropertyName = "FooterText";
        private string _footerText = "Copyleft @ 2011";
        public string FooterText
        {
            get
            {
                return _footerText;
            }
            set
            {
                if (_footerText != value)
                {
                    _footerText = value;
                    RaisePropertyChanged(FooterTextPropertyName);
                }
            }
        }

        public const string IsGameInProgressPropertyName = "IsGameInProgress";
        private bool _isGameInProgress = false;
        public bool IsGameInProgress
        {
            get
            {
                return _isGameInProgress;
            }
            set
            {
                if (_isGameInProgress != value)
                {
                    _isGameInProgress = value;
                    RaisePropertyChanged(IsGameInProgressPropertyName);
                }
            }
        }

        public const string IsGameInProgressVisibilityPropertyName = "IsGameInProgressVisibility";
        private Visibility _isGameInProgressVisibility = Visibility.Collapsed;
        public Visibility IsGameInProgressVisibility
        {
            get
            {
                return _isGameInProgressVisibility;
            }
            set
            {
                if (_isGameInProgressVisibility != value)
                {
                    _isGameInProgressVisibility = value;
                    RaisePropertyChanged(IsGameInProgressVisibilityPropertyName);
                }
            }
        }
    }
}
